package com.han.yuhannews.adapter;

import java.util.List;
import java.util.Map;

import com.han.yuhannews.R;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SimpleAdapter;
import android.widget.TextView;

public class CategoryAdapter extends SimpleAdapter {

	public CategoryAdapter(Context context, List<? extends Map<String, ?>> data,
			int resource, String[] from, int[] to) {
		super(context, data, resource, from, to);
		// TODO Auto-generated constructor stub
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		View view = super.getView(position, convertView, parent);
		if (position == 0) {
			TextView categoryTitle = (TextView) view;
			categoryTitle
					.setBackgroundResource(R.drawable.categorybar_item_background);
			categoryTitle.setTextColor(0XFFFFFFFF);

		}

		return view;

	}
}
